import html from './html';
import init from '@feidao/web/framework/nodejs/d/page';
import s from './ns';

////////////////////////////////////////////////////////////////////////////////
import na001 from './na001';
////////////////////////////////////////////////////////////////////////////////

feidao_exports.default = async (url: string) => {

	const daoke = { na001 };

	const res = await init(html, url, s, daoke);
	const html_str = `<html lang="en">

	<head>
	<meta charset="UTF-8">
		<meta http-equiv="X-UA-Compatible" content="ie=edge">
		<title>登录</title>
		<link rel="shortcut icon" href="./css/favicon.ico" />
		<link rel="stylesheet" type="text/css" href="./css/iconfont.css">
		<link href="https://cdn.jsdelivr.net/npm/feidao-css/feidao.css" type="text/css" rel="stylesheet">
		<link rel="stylesheet" type="text/css" href="./css/daokes.css">
		<script src="https://cdn.jsdelivr.net/npm/@webcomponents/webcomponentsjs/custom-elements-es5-adapter.js"></script> 	<script src="https://cdn.jsdelivr.net/npm/@webcomponents/webcomponentsjs/webcomponents-loader.js"></script>
		<script src="./js/feidao.js"></script>
		<script src="./js/login.js"></script>
	</head>

	<body class="bg-1890ff login-bg">
	${html.toString()}
	</body>
	</html>`;
	const html_obj = { data: html_str };
	if (typeof res === 'object' && Object.keys(res).length > 0) {
		const result = Object.assign({}, res, html_obj);
		return result;
	}
	return html_obj;
}
